package com.yiqi.lottery.framework;

import android.content.res.Configuration;
import android.content.res.Resources;
import android.util.Log;

import com.tencent.tinker.loader.app.TinkerApplication;
import com.tencent.tinker.loader.shareutil.ShareConstants;

/**
 * @email
 * @date 2017/9/11 16:59
 */

public class LotteryApplication extends TinkerApplication {

    public LotteryApplication() {
        super(ShareConstants.TINKER_ENABLE_ALL, "com.yiqi.lottery.framework.SampleApplicationLike",
                "com.tencent.tinker.loader.TinkerLoader", false);
    }

    @Override
    public Resources getResources() {//还原字体大小
        Resources res = super.getResources();
        Configuration configuration = res.getConfiguration();
        if (configuration.fontScale != 1.0f) {//fontScale要缩放的比例
            configuration.fontScale = 1.0f;
            res.updateConfiguration(configuration, res.getDisplayMetrics());
        }
        return res;
    }

}